<extend name="Public/form"/>
<block name="form">
<form method="post" action="{:U()}" class="dataform" id="dataform">
	<table width="100%" cellpadding="0" cellspacing="8">
		<tr>
			<td width="100" align="right">菜单名称：</td>
			<td><input type="text" name="data[menu_name]" size="25" class="text"  maxlength="60"  value="{$data.menu_name}"  datatype="*"  nullmsg="请输入菜单名称！" placeholder="请输入菜单名称"></td>
		</tr>
		<tr>
			<td width="100" align="right">上级菜单：</td>
			<td>
			<select name="data[pid]">
				<option value="0">顶级菜单</option>
				{$pid}
			</select>
			</td>
		</tr>
		<tr>
			<td width="100" align="right">功能节点：</td>
			<td><input type="text" name="data[url]" size="25" class="text"  maxlength="60"  value="{$data.url}"  datatype="*"  nullmsg="请输入功能节点！" placeholder="请输入功能节点"/></td>
		</tr>
		<tr>
			<td width="100" align="right">菜单图标：</td>
			<td><input type="text" name="data[ico]" size="25" class="text"  maxlength="60"  value="{$data.ico}"/></td>
		</tr>
		<tr>
			<td width="100" align="right">同级序号：</td>
			<td><input type="text" name="data[sort_order]" size="25" class="text"  maxlength="60"  value="{$data.sort_order}"/></td>
		</tr>
		<tr>
			<td width="100" align="right">菜单位置：</td>
			<td>
			<select name="data[position]">
				<volist name="position" id="vo">
					<option value="{$vo['code']}">{$vo['name']}</option>
				</volist>
			</select>
			</td>
		</tr>
	</table>
	<div class="barea mtw">
		<button type="submit" class="btn btn-success">确定</button>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<button type="button" class="btn btn-success xubox_close">取消</button>
		<input type="hidden" name="id" value="{$data.mid}" />
	</div>
</form>
</block>
<block name="script">
<script type="text/javascript">
$(function(){
	var form = $(".dataform").Validform({
		tiptype:function(msg,o){
			if(!o.obj.is("form")){
				showmsg(msg);
			}
		},
		ajaxPost:true,
		callback:function(data){
			if(data.status){
				loadData();
				layer.closeAll();
			} else {
				myAlert(data.info);
			}
		}
	});
})
</script>
</block>